{extend name="../../common/view/template/admin" /}

{block name='style'}
<style>

</style>
{/block}

{block name='body'}
<div class="layout">
    <div class="layout-nav">
        <ul class="layui-nav layui-bg-cyan layui-nav-tree layui-nav-side radius-0">
            <li class="layui-nav-item text-center" lay-unselect>
                <a class="margin">
                    <img src="/common/assets/web/images/logo.png" class="layui-nav-img" style="margin-right: 0;">
                </a>
            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;">工作台</a>
                <dl class="layui-nav-child">
                    <dd class="layui-this"><a href="{:url('main/main')}" target="iframebox">后台首页</a></dd>
                    <dd><a href="{:url('main/data')}" target="iframebox">数据统计</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">合作</a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('partners/index')}" target="iframebox">合作伙伴列表</a></dd>
                    <dd><a href="{:url('user/index')}" target="iframebox">用户列表</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">配置</a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('configs/system')}" target="iframebox">系统配置</a></dd>
                    <dd><a href="{:url('configs/aiThinktop')}" target="iframebox">顶想云配置</a></dd>
                    <dd><a href="{:url('configs/aiDeepseek')}" target="iframebox">DeepSeek配置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('admin/index')}" target="iframebox">后台用户管理</a></dd>
                    <dd><a href="{:url('system/log')}" target="iframebox">系统日志</a></dd>
                    <dd><a href="javascript:;" class="logout">退出后台</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <div class="layout-body">
        <iframe
            name="iframebox"
            frameborder="0"
            width="100%"
            height="100%"
            src="{:url('main/main')}"
        ></iframe>
    </div>
</div>

{/block}

{block name="script"}
<script>
    layui.use(['element', 'layer'], function () {
        var $ = layui.$;
        var element = layui.element;
        var layer = layui.layer;

        $(".logout").click(function (e) { 
            e.preventDefault();
            
            layer.confirm('确定要退出后台吗？', {icon: 3}, function() {
                window.location.href = "{:url('index/logout')}";
            }, function() {
                //
            });
            return false;
        });
    });
</script>
{/block}